<template>
  <div class="box">
    <h1>A组件组件,{{ count.num }}</h1>
    <van-button type="primary" @click="handleNum">+</van-button>
    <div v-for="item in banner.list" :key="item.objectId">
      {{ item.name }}
    </div>
  </div>
</template>

<script setup lang="ts">
import { useBanner } from "../../store/banner";
import { useCounter } from "../../store/count";
const count = useCounter();
const handleNum = () => {
  count.num++;
};

const banner = useBanner();
banner.bannerGetAct(); //调用action
</script>

<style scoped>
.box {
  width: 50%;
  height: 500px;
  border: 1px solid #333;
  float: left;
  box-sizing: border-box;
}
</style>
